import request from '@/utils/_request'

export function approList(query) {
    return request({
        url: '/admin/contest/active/audit/query',
        method: 'post',
        data: query,
    })
}

/** 已审核 */
export function authedList(data) {
    return request({
        url: `/admin/contest/active/audit/queryRecordByAuditPerson`,
        method: 'post',
        data: data,
    })
}

/** 查询竞赛信息 */
export function approById(id) {
    return request({
        url: `/admin/contest/active/audit/queryById/${id}`,
        method: 'get',
    })
}

/** 下载文件 */
export function downloadFile(url) {
    return request({
        url: `/admin/common/download?path=${url}`,
        method: 'get',
        responseType:'blob',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
}

/** 竞赛审核 */
export function contestAuth(data) {
    return request({
        url: `/admin/contest/active/audit/edit`,
        method: 'put',
        data: data,
    })
}

/** 竞赛结果审核 */
export function contestResAuth(data) {
    return request({
        url: `/admin/contest/active/audit/edit/contest/result`,
        method: 'put',
        data: data,
    })
}

/** 人员信息审核 */
export function staffAuth(data) {
    return request({
        url: `/admin/contest/active/audit/edit/personInfo`,
        method: 'put',
        data: data,
    })
}
/**查看人员信息*/
export function getStaff(id){
    return request({
        url:'/admin/contest/queryById/'+id,
        method:'GET'
    })
}
/**获取部门*/
export function listDept(data){
    return request({
        url:'/admin/contest/dept/query',
        method:'POST',
        data:data
    })
}


